﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iSun.Entity;
using iSun.Model;
namespace iSun.SYS.Bussiness.Message
{
    public partial class BDatMessageReceiver : BLL.Base.BaseBussnies<DatMessageReceiver>
    {
        public BDatMessageReceiver() { this.entity = new DatMessageReceiver(); }

        /// <summary>
        /// 获取指消息的接收范围集合
        /// </summary>
        /// <param name="MsgID">消息ID</param>
        /// <returns>接收范围集合</returns>
        public IList<DatMessageReceiver> GetReceivers(Guid MsgID)
        {
            string s = "MsgID='"+ MsgID.ToString()+ "'";
            return this.GetEntityListByCondition<DatMessageReceiver>(s);
        }

        /// <summary>
        ///  获取指编号的接收范围
        /// </summary>
        /// <param name="MsItemID"></param>
        /// <returns></returns>
        public DatMessageReceiver GetDatPhraseDetailByID(Guid MsItemID)
        {
            return this.GetEntityById<DatMessageReceiver>(MsItemID);
        }
    }

}
